package cn.ruituo.adv2;

import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;

public class JiHe2 {
    public static void main(String[] args) {
        //泛型：规定了集合中的对象的类型

        List<Pengiun> list=new LinkedList<>();
        list.add(new Pengiun("大花",3,"帝企鹅"));
        list.add(new Pengiun("二花",2,"帝企鹅"));
        list.add(new Pengiun("小花",1,"小黄企鹅"));
        Pengiun p=new Pengiun("小花",15,"小蓝企鹅");
        list.add(p);
        for(Pengiun pp:list)
            System.out.println(pp);
        //list.add("3333232");
        List<Integer> li2=new ArrayList<>();
    }
}
